package com.glsc.ngateway.common.base.repo.mysql.flowable;

import com.glsc.ngateway.common.base.domain.mysql.flowable.FlowableAppend;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @author lium
 * @date 2021/10/27
 */
public interface FlowableAppendRepo extends JpaRepository<FlowableAppend, Long>, JpaSpecificationExecutor<FlowableAppend> {

    @Query(value = "select m.appendixPath from FlowableAppend m where m.appendixId = :appendixId ")
    String getAppendixPathById(@Param("appendixId") String appendixId);

    List<FlowableAppend> findByAppendixIdIn(List<String> appendixIds);
}
